<template>
	<view class="container">
			<uni-list v-for="(item,index) in list">
				<uni-badge text="7" :absolute="absolute" :offset="offset">
				<uni-list-item  :title="item.name" :note="item.password"
					:thumb="'/static'+item.icon" thumb-size="lg" >
				</uni-list-item>
				</uni-badge>
			</uni-list>
		</view>
</template>

<script>
	export default {
			data() {
				return {
					"list": [
					],
					offset: [20, 38],
					absolute: 'rightTop'
				}
			},
			methods: {
	
			},
			onLoad()  {
			uni.request({
				url:'http://localhost:8090/freshmenapp/user/list',
				method:'POST',
				data:{},
				success:res=>{
					if(res.data.success){
						this.list=res.data.list
						uni.showToast({
							title: '成功'
						});
					}else{
						uni.showToast({
							title: '失败',
							icon:'none'
						});
					}
				},
				fail:()=>{
					uni.showToast({
						title: '网络错误',
						icon:'none'
					});
				},
				complete: () => {}
				
			});
			
			}
		}
</script>

<style>
	.container {
			padding: 20px;
			font-size: 14px;
			line-height: 24px;
			/* position: relative; */
		}
</style>